#include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main() {
    int M, N,X,Y;
    cin >> M >> N >> X >> Y;
    
    int* x_arr = new int[M + 1];
    x_arr[0] = X;
    int* y_arr = new int[N + 1];
    y_arr[0] = Y;
    for (int i = 1; i <= M; i++)
    {
        cin >> x_arr[i];
    }
    for (int i = 1; i <= N; i++)
    {
        cin >> y_arr[i];
    }

    sort(x_arr, x_arr + M + 1);
    sort(y_arr, y_arr + N + 1);

    bool v[200] = { false };
    for (int i = x_arr[0]+100; i <= x_arr[M]+100; i++)
    {
        v[i] = true;
    }
    bool flag = false;
    for (int i = y_arr[0]+100; i <= y_arr[N]+100; i++)
    {
        if (v[i])
        {
            flag = true;
        }
    }
    if (flag)
    {
        cout << X << " and " << Y << ": possible" << endl;
    }
    else
    {
        cout << X << " and " << Y << ": impossible" << endl;
    }
    return 0;
}
